Rich Nielsen
2 August, 2012
nielsen.rich@gmail.com

Replication materials for "Rewarding Human Rights? Selective Aid Sanctions against Repressive States", forthcoming, International Studies Quarterly.

This zipped folder contains the data and code necessary to reproduce the statistical models reported in the text and Supporting Information.  It does NOT contain a few things.  Most notably, the data are already "merged" together, and I am not able to include a few datasets because they are either too large (the "channel of delivery" data reported in the Supporting Information) or proprietary (the ICRG data on governance, reported in the Supporting Information).  If you would like the full-sized archive (551 MB) in order to actually merge the data yourself, etc, please contact me and we'll try to figure out a way to get it to you (minus the proprietary bits).

The zipped directory contains two subdirectories, "scripts" and "data":

"scripts" contains:

  /scripts/data 1.do    This is the script to build the monadic data from scratch.  It doesn't work (because you don't have the necessary raw data sources) but may be useful for reference.  It is in Stata .do format and is written in Stata's language.

  /scripts/data 2.do    This is the script to build the dyadic data from scratch.  It doesn't work (because you don't have the necessary raw data sources) but may be useful for reference.  It is in Stata .do format and is written in Stata's language. It is in Stata .do format.

  /scripts/analysis.txt This is the script that does the entire analysis.  It is written in Stata's language (with some R code mixed in) and is saved as a .txt file due to its size.

I performed almost all of the analysis in Stata 9.  To exactly replicate all of the analysis, you will need to obtain a copy of Stata 9.  Stata 10 gives similar estimates but their are slight differences due to changes in the optimization routine.  Starting with Stata 11, Statacorp managed to somehow break their xttobit function such that on most (but not all) runs of these models, Stata returns the error "initial values not feasible, r(1400);".  In theory, it should be possible to avoid this by setting the version to 9 using the version command, but I find that this does not work.  Setting the version to 9 will produce the correct estimates if the model happens to not get stuck, but it does not keep the model from getting stuck most of the time.

It is possible to run the models in Stata 11 and higher, but it takes some patience.  First, set the version to 9.  Then, you will have to sit and manually re-run the models until one of them gets past whatever is breaking in the gauss-hermite quadrature and manages to converge.  Failure is always at the first step of the quadrature, so I'm pretty sure it is a problem with Stata's programming and not with the fragility of the model.  I find that the best way to get it to eventually run in Stata 12 is to reload the data each time and just keep trying.  See the enclosed .smcl file "trying xttobit in stata 12" for proof that it will work eventually.  I find that about 1 in 10 runs converges, so to run the first model in Stata 12, I would copy and paste the following into the command line (NOT a do-file):

version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 
version 9
set mem 1000M
set more off
use "data/dat2.dta", clear
xttobit lnaidpc l.physint l.polity2 l.lnaidpc lnworldaidtotal l.ln_rgdpc l.ln_population l.ln_trade l.alliance dyad_colony socialist ColdWar coldwarsoc l.war region_SSA region_Latin region_MENA region_EAsiaPac l.ratpercent l.donor_physint l.donorallyneighbor2 l.s3un  l.lnnytimes l.lnreftotal post2001 if inmysample==1, ll(0) intpoints(20) 

Yes, I realize that this is frustrating.  You have a few options: (1) run all the models as above (2) find a copy of Stata 9 or 10, (3) program your own tobit with random intercepts, (4) take it up with Statacorp.

There is one portion of the robustness checks that I ran in Stata 12 (noted in the script).  There are also portions written in R.  I ran them in R 15.0, but there should be no problem with versioning.

In Stata 9 (and where appropriate, in R), run "analysis.txt".  You will first want to search and replace "your/directory/here" with the directory path to where you have the archive unzipped.  Use forward slashes "/" so that it will work with R ("\" is the escape character in R).  

Note that it is divided up into different sections that are recorded in individual stata log files (.smcl format).  Each of these can be run independently of the others, so for speed, it may be preferrable to run them seperately in multiple instances of Stata (and R).  You can tell when R is needed because the commenting character changes from * to #.

The script will make two additional folders, "working" and "results".  All of the results will be dumped into "results".  Look there for the .smcl files and pdfs of the results.


Variables:
lnaidpc -- log of aid per capita
lneconaidpc -- log of economic aid per capita
lnsocaidpc -- log of social aid per capita
lnhrcvaidpc -- log of human rights and democracy aid per capita
physint -- physical integrity rights (CIRI), reversed
ratpercent -- the percent of UN human rights treaties ratified by the donor
ratpercent_physint -- interaction of "ratpercent" and "physint"
donor_physint -- donor physical integrity rights (CIRI)
donor_physint_physint -- interaction of "donor_physint" and "physint"
donorallyneighbor2 -- an indicator for whether a country is neighbor to the donor's ally but is not itself an ally
allyneighbor2_physint -- interaction of "donorallyneighbor2" and "physint"
alliance -- an indicator for an alliance between the donor and recipient
alliance_physint -- interaction of "alliance" and "physint"
s3un -- continuous measure of UN voting similarity
s3un_physint -- interaction of "s3un" and "physint"
lnnytimes -- log of New York Times human rights coverage
lnnytimes_physint -- interaction of "lnnytimes" and "physint"
lnreftotal -- log of refugees
lnreftotal_physint -- interaction of "lnreftotal" and "physint"
polity2 -- democracy (Polity IV)
lnworldaid -- world-wide flows of all aid
lnworldaidecon -- world-wide flows of economic aid
lnworldaidsoc -- world-wide flows of social aid
lnworldaidhrcv -- world-wide flows of human rights and democracy aid
ln_rgdpc -- log real gdp per capita
ln_population -- log population
ln_trade -- log trade (imports and exports)
dyad_colony -- an indicator for a former colonial relationship between donor and recipient
socialist -- an indicator for states that were socialist during the Cold War
ColdWar -- an indicator for the Cold War (0 is pre-1991, 1 is post-1991)
ColdWar_physint -- interaction of "ColdWar" and "physint"
coldwarsoc -- interaction of "ColdWar" and "socialist"
war -- prio war variable
post2001 -- indicator equal to 1 if year > 2001
region_SSA -- indicator for sub-saharan africa
region_Latin -- indicator for latin america
region_MENA -- indicator for middle east/north africa
region_EAsiaPac -- indicator for east asia and pacific
inmysample -- indicator for observations that are in my sample


